package cn.libinal.scloud.base.entity;

import cn.libinal.scloud.base.common.entity.JpaBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author libinal
 * created at 2018/11/4 15:29
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "sys_permission")
public class Permission extends JpaBaseEntity {

    private static final long serialVersionUID = 5027128434246298316L;
    /**
     * 权限名
     */
    @Column(name = "permission_name", length = 50, nullable = false)
    private String name;

    /**
     * 权限英文名 (由模块sn+当前sn组成, 大写字母)
     */
    @Column(name = "permission_sn", length = 50, nullable = false)
    private String sn;

    /**
     * 优先级
     */
    @Column(name = "priority")
    private Integer priority;

    /**
     * 权限描述
     */
    @Column(name = "description", length = 200)
    private String description;

}
